home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch4e < prev    next >
Encoding:
Internet Message Format  |  1989-10-02  |  58.9 KB

  1. Path: uunet!zephyr.ens.tek.com!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v08i041:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch4e
  5. Message-ID: <4631@tekred.CNA.TEK.COM>
  6. Date: 29 Sep 89 21:11:06 GMT
  7. Sender: nobody@tekred.CNA.TEK.COM
  8. Lines: 2288
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 8, Issue 41
  13. Archive-name: NetHack3/Patch4e
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16. #! /bin/sh
  17. # This is a shell archive.  Remove anything before this line, then unpack
  18. # it by saving it into a file and typing "sh file".  To overwrite existing
  19. # files, type "sh file -c".  You can also feed this as standard input via
  20. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  21. # will see the following message at the end:
  22. #        "End of archive 5 (of 11)."
  23. # Contents:  patches04e
  24. # Wrapped by billr@saab on Fri Sep 29 13:14:17 1989
  25. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  26. if test -f 'patches04e' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'patches04e'\"
  28. else
  29. echo shar: Extracting \"'patches04e'\" \(56197 characters\)
  30. sed "s/^X//" >'patches04e' <<'END_OF_FILE'
  31. X*** src/Old/topl.c    Wed Sep 27 12:21:06 1989
  32. X--- src/topl.c    Mon Sep 25 23:07:03 1989
  33. X***************
  34. X*** 2,7 ****
  35. X--- 2,8 ----
  36. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  37. X  /* NetHack may be freely redistributed.  See license for details. */
  38. X  
  39. X+ #define NEED_VARARGS
  40. X  #include "hack.h"
  41. X  
  42. X  char toplines[BUFSIZ];
  43. X***************
  44. X*** 134,154 ****
  45. X  }
  46. X  
  47. X  /*VARARGS1*/
  48. X! /* Because the modified mstatusline has 9 arguments KAA */
  49. X  void
  50. X! pline(line,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)
  51. X! #ifndef TOS
  52. X! register
  53. X  #endif
  54. X! const char *line,*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9;
  55. X! {
  56. X      char pbuf[BUFSZ];
  57. X      register char *bp = pbuf, *tl;
  58. X      register int n,n0;
  59. X  
  60. X      if(!line || !*line) return;
  61. X      if(!index(line, '%')) Strcpy(pbuf,line); else
  62. X!     Sprintf(pbuf,line,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
  63. X      if(no_repeat && flags.toplin == 1 && !strcmp(pbuf, toplines)) return;
  64. X      nscr();        /* %% */
  65. X  
  66. X--- 135,177 ----
  67. X  }
  68. X  
  69. X  /*VARARGS1*/
  70. X! /* Note the modified mstatusline has 9 arguments KAA */
  71. X! 
  72. X! /* Also note that these declarations rely on knowledge of the internals
  73. X!  * of the variable argument handling stuff in "tradstdc.h"
  74. X!  */
  75. X! 
  76. X! #if defined(USE_STDARG) || defined(USE_VARARGS)
  77. X! void
  78. X! pline VA_DECL(const char *, line)
  79. X!     VA_START(line);
  80. X!     VA_INIT(line, char *);
  81. X!     vpline(line, VA_ARGS);
  82. X!     VA_END();
  83. X! }
  84. X! 
  85. X! # ifdef USE_STDARG
  86. X! void
  87. X! vpline(const char *line, va_list the_args) {
  88. X! # else
  89. X! void
  90. X! vpline(line, the_args) const char *line; va_list the_args; {
  91. X! # endif
  92. X! 
  93. X! #else  /* USE_STDARG | USE_VARARG */
  94. X! 
  95. X  void
  96. X! pline VA_DECL(const char *, line)
  97. X  #endif
  98. X! 
  99. X      char pbuf[BUFSZ];
  100. X      register char *bp = pbuf, *tl;
  101. X      register int n,n0;
  102. X+ /* Do NOT use VA_START and VA_END in here... see above */
  103. X  
  104. X      if(!line || !*line) return;
  105. X      if(!index(line, '%')) Strcpy(pbuf,line); else
  106. X!     Vsprintf(pbuf,line,VA_ARGS);
  107. X      if(no_repeat && flags.toplin == 1 && !strcmp(pbuf, toplines)) return;
  108. X      nscr();        /* %% */
  109. X  
  110. X***************
  111. X*** 206,257 ****
  112. X  
  113. X  /*VARARGS1*/
  114. X  void
  115. X! Norep(line,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)
  116. X! #ifndef TOS
  117. X! register
  118. X! #endif
  119. X! const char *line,*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9;
  120. X! {
  121. X      no_repeat = TRUE;
  122. X!     pline(line, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
  123. X      no_repeat = FALSE;
  124. X      return;
  125. X  }
  126. X  
  127. X  /*VARARGS1*/
  128. X  void
  129. X! You(line,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)
  130. X! #ifndef TOS
  131. X! register
  132. X! #endif
  133. X! const char *line,*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9;
  134. X! {
  135. X      char *tmp;
  136. X      tmp = (char *)alloc((unsigned int)(strlen(line) + 5));
  137. X      Strcpy(tmp, "You ");
  138. X      Strcat(tmp, line);
  139. X!     pline(tmp, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
  140. X      free(tmp);
  141. X      return;
  142. X  }
  143. X  
  144. X  /*VARARGS1*/
  145. X  void
  146. X! Your(line,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)
  147. X! #ifndef TOS
  148. X! register
  149. X! #endif
  150. X! const char *line,*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9;
  151. X! {
  152. X      char *tmp;
  153. X      tmp = (char *)alloc((unsigned int)(strlen(line) + 6));
  154. X      Strcpy(tmp, "Your ");
  155. X      Strcat(tmp, line);
  156. X!     pline(tmp, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
  157. X      free(tmp);
  158. X      return;
  159. X  }
  160. X  
  161. X  void
  162. X  putsym(c)
  163. X  char c;
  164. X--- 229,299 ----
  165. X  
  166. X  /*VARARGS1*/
  167. X  void
  168. X! Norep VA_DECL(const char *, line)
  169. X!     VA_START(line);
  170. X!     VA_INIT(line, const char *);
  171. X      no_repeat = TRUE;
  172. X!     vpline(line, VA_ARGS);
  173. X      no_repeat = FALSE;
  174. X+     VA_END();
  175. X      return;
  176. X  }
  177. X  
  178. X  /*VARARGS1*/
  179. X  void
  180. X! You VA_DECL(const char *, line)
  181. X      char *tmp;
  182. X+     VA_START(line);
  183. X+     VA_INIT(line, const char *);
  184. X      tmp = (char *)alloc((unsigned int)(strlen(line) + 5));
  185. X      Strcpy(tmp, "You ");
  186. X      Strcat(tmp, line);
  187. X!     vpline(tmp, VA_ARGS);
  188. X      free(tmp);
  189. X+     VA_END();
  190. X      return;
  191. X  }
  192. X  
  193. X  /*VARARGS1*/
  194. X  void
  195. X! Your VA_DECL(const char *,line)
  196. X      char *tmp;
  197. X+     VA_START(line);
  198. X+     VA_INIT(line, const char *);
  199. X      tmp = (char *)alloc((unsigned int)(strlen(line) + 6));
  200. X      Strcpy(tmp, "Your ");
  201. X      Strcat(tmp, line);
  202. X!     vpline(tmp, VA_ARGS);
  203. X      free(tmp);
  204. X+     VA_END();
  205. X      return;
  206. X  }
  207. X  
  208. X+ /*ARGSUSED*/
  209. X+ /*VARARGS2*/
  210. X+ void
  211. X+ kludge  VA_DECL2(char *, str, char *, arg)
  212. X+ #ifdef VA_NEXT
  213. X+     char *other1, *other2, *other3;
  214. X+ #endif
  215. X+     VA_START(arg);
  216. X+     VA_INIT(str, char *);
  217. X+     VA_INIT(arg, char *);
  218. X+ #ifdef VA_NEXT
  219. X+     VA_NEXT(other1, char *);
  220. X+     VA_NEXT(other2, char *);
  221. X+     VA_NEXT(other3, char *);
  222. X+ # define OTHER_ARGS other1,other2,other3
  223. X+ #else
  224. X+ # define OTHER_ARGS arg1,arg2,arg3
  225. X+ #endif
  226. X+     if(Blind || !flags.verbose) {
  227. X+         if(*str == '%') pline(str,"It",OTHER_ARGS);
  228. X+         else pline(str,"it",OTHER_ARGS);
  229. X+     } else pline(str,arg,OTHER_ARGS);
  230. X+     VA_END();
  231. X+ }
  232. X+ 
  233. X  void
  234. X  putsym(c)
  235. X  char c;
  236. X***************
  237. X*** 311,314 ****
  238. X--- 353,366 ----
  239. X      flags.toplin = 2;
  240. X  
  241. X      return q;
  242. X+ }
  243. X+ 
  244. X+ /*VARARGS1*/
  245. X+ void
  246. X+ impossible VA_DECL(char *, s)
  247. X+     VA_START(s);
  248. X+     VA_INIT(s, char *);
  249. X+     vpline(s,VA_ARGS);
  250. X+     pline("Program in disorder - perhaps you'd better Quit.");
  251. X+     VA_END();
  252. X  }
  253. X*** src/Old/topten.c    Wed Sep 27 12:21:23 1989
  254. X--- src/topten.c    Sun Sep 17 12:27:57 1989
  255. X***************
  256. X*** 42,55 ****
  257. X      int rank, rank0 = -1, rank1 = 0;
  258. X      int occ_cnt = PERSMAX;
  259. X      register struct toptenentry *t0, *t1, *tprev;
  260. X-     char *recfile = RECORD;
  261. X  #ifdef UNIX
  262. X      char *reclock = "record_lock";
  263. X  # ifdef NO_FILE_LINKS
  264. X      int lockfd ;
  265. X  # endif
  266. X-     int sleepct = 100;
  267. X  #endif /* UNIX */
  268. X      FILE *rfile;
  269. X      register int flg = 0;
  270. X  #ifdef LOGFILE
  271. X--- 42,62 ----
  272. X      int rank, rank0 = -1, rank1 = 0;
  273. X      int occ_cnt = PERSMAX;
  274. X      register struct toptenentry *t0, *t1, *tprev;
  275. X  #ifdef UNIX
  276. X      char *reclock = "record_lock";
  277. X  # ifdef NO_FILE_LINKS
  278. X      int lockfd ;
  279. X  # endif
  280. X  #endif /* UNIX */
  281. X+ #ifdef VMS
  282. X+     char *reclock = "record_lock;1";
  283. X+     char recfile[] = RECORD;
  284. X+ #else
  285. X+     char *recfile = RECORD;
  286. X+ #endif
  287. X+ #if defined(UNIX) || defined(VMS)
  288. X+     int sleepct = 100;
  289. X+ #endif
  290. X      FILE *rfile;
  291. X      register int flg = 0;
  292. X  #ifdef LOGFILE
  293. X***************
  294. X*** 57,64 ****
  295. X      FILE *lfile;
  296. X  # ifdef UNIX
  297. X      char *loglock = "logfile_lock";
  298. X-     int sleeplgct = 30;
  299. X  # endif /* UNIX */
  300. X  #endif /* LOGFILE */
  301. X  
  302. X  #ifdef MSDOS
  303. X--- 64,76 ----
  304. X      FILE *lfile;
  305. X  # ifdef UNIX
  306. X      char *loglock = "logfile_lock";
  307. X  # endif /* UNIX */
  308. X+ # ifdef VMS
  309. X+     char *loglock = "logfile_lock;1";
  310. X+ # endif /* VMS */
  311. X+ # if defined(UNIX) || defined(VMS)
  312. X+     int sleeplgct = 30;
  313. X+ # endif /* UNIX or VMS */
  314. X  #endif /* LOGFILE */
  315. X  
  316. X  #ifdef MSDOS
  317. X***************
  318. X*** 84,90 ****
  319. X      Strcpy(t0->date, getdate());
  320. X  
  321. X  #ifdef LOGFILE        /* used for debugging (who dies of what, where) */
  322. X! # ifdef UNIX
  323. X  #  ifdef NO_FILE_LINKS
  324. X      loglock = (char *)alloc(sizeof(LOCKDIR)+1+strlen(lgfile)+6);
  325. X      Strcpy(loglock,LOCKDIR) ;
  326. X--- 96,102 ----
  327. X      Strcpy(t0->date, getdate());
  328. X  
  329. X  #ifdef LOGFILE        /* used for debugging (who dies of what, where) */
  330. X! # if defined(UNIX) || defined(VMS)
  331. X  #  ifdef NO_FILE_LINKS
  332. X      loglock = (char *)alloc(sizeof(LOCKDIR)+1+strlen(lgfile)+6);
  333. X      Strcpy(loglock,LOCKDIR) ;
  334. X***************
  335. X*** 108,119 ****
  336. X          HUP Printf("Waiting for access to log file. (%d)\n",
  337. X               sleeplgct);
  338. X          HUP (void) fflush(stdout);
  339. X! #  if defined(SYSV) || defined(ULTRIX)
  340. X          (void)
  341. X  #  endif
  342. X              sleep(1);
  343. X      }
  344. X! # endif /* UNIX */
  345. X      if(!(lfile = fopen(lgfile,"a"))){
  346. X          HUP (void) puts("Cannot open log file!");
  347. X          goto lgend;
  348. X--- 120,131 ----
  349. X          HUP Printf("Waiting for access to log file. (%d)\n",
  350. X               sleeplgct);
  351. X          HUP (void) fflush(stdout);
  352. X! #  if defined(SYSV) || defined(ULTRIX) || defined(VMS)
  353. X          (void)
  354. X  #  endif
  355. X              sleep(1);
  356. X      }
  357. X! # endif /* UNIX or VMS */
  358. X      if(!(lfile = fopen(lgfile,"a"))){
  359. X          HUP (void) puts("Cannot open log file!");
  360. X          goto lgend;
  361. X***************
  362. X*** 124,132 ****
  363. X          t0->hp, t0->maxhp, t0->points,
  364. X          t0->plchar, t0->sex, t0->name, t0->death);
  365. X      (void) fclose(lfile);
  366. X! # ifdef UNIX
  367. X      (void) unlink(loglock);
  368. X! # endif /* UNIX */
  369. X        lgend:;
  370. X  # ifdef NO_FILE_LINKS
  371. X      (void) close(lockfd) ;
  372. X--- 136,144 ----
  373. X          t0->hp, t0->maxhp, t0->points,
  374. X          t0->plchar, t0->sex, t0->name, t0->death);
  375. X      (void) fclose(lfile);
  376. X! # if defined(UNIX) || defined(VMS)
  377. X      (void) unlink(loglock);
  378. X! # endif /* UNIX or VMS */
  379. X        lgend:;
  380. X  # ifdef NO_FILE_LINKS
  381. X      (void) close(lockfd) ;
  382. X***************
  383. X*** 140,146 ****
  384. X  # endif
  385. X  #endif /* LOGFILE */
  386. X  
  387. X! #ifdef UNIX
  388. X  # ifdef NO_FILE_LINKS
  389. X      reclock = (char *)alloc(sizeof(LOCKDIR)+1+strlen(recfile)+7);
  390. X      Strcpy(reclock,LOCKDIR) ;
  391. X--- 152,158 ----
  392. X  # endif
  393. X  #endif /* LOGFILE */
  394. X  
  395. X! #if defined(UNIX) || defined(VMS)
  396. X  # ifdef NO_FILE_LINKS
  397. X      reclock = (char *)alloc(sizeof(LOCKDIR)+1+strlen(recfile)+7);
  398. X      Strcpy(reclock,LOCKDIR) ;
  399. X***************
  400. X*** 160,171 ****
  401. X          HUP Printf("Waiting for access to record file. (%d)\n",
  402. X              sleepct);
  403. X          HUP (void) fflush(stdout);
  404. X! # if defined(SYSV) || defined(ULTRIX)
  405. X          (void)
  406. X  # endif
  407. X              sleep(1);
  408. X      }
  409. X! #endif /* UNIX */
  410. X      if(!(rfile = fopen(recfile,"r"))){
  411. X          HUP (void) puts("Cannot open record file!");
  412. X          goto unlock;
  413. X--- 172,183 ----
  414. X          HUP Printf("Waiting for access to record file. (%d)\n",
  415. X              sleepct);
  416. X          HUP (void) fflush(stdout);
  417. X! # if defined(SYSV) || defined(ULTRIX) || defined(VMS)
  418. X          (void)
  419. X  # endif
  420. X              sleep(1);
  421. X      }
  422. X! #endif /* UNIX or VMS */
  423. X      if(!(rfile = fopen(recfile,"r"))){
  424. X          HUP (void) puts("Cannot open record file!");
  425. X          goto unlock;
  426. X***************
  427. X*** 244,249 ****
  428. X--- 256,269 ----
  429. X      }
  430. X      if(flg) {    /* rewrite record file */
  431. X          (void) fclose(rfile);
  432. X+ #ifdef VMS
  433. X+         {
  434. X+             char *sem = rindex(recfile, ';');
  435. X+ 
  436. X+             if (sem)
  437. X+                 *sem = '\0';
  438. X+         }
  439. X+ #endif
  440. X          if(!(rfile = fopen(recfile,"w"))){
  441. X              HUP (void) puts("Cannot write record file\n");
  442. X              goto unlock;
  443. X***************
  444. X*** 295,302 ****
  445. X      if(rank0 >= rank) if(!done_stopprint)
  446. X          (void) outentry(0, t0, 1);
  447. X      (void) fclose(rfile);
  448. X  unlock:    ;
  449. X! #ifdef UNIX
  450. X  # ifdef NO_FILE_LINKS
  451. X      (void) close(lockfd) ;
  452. X  # endif
  453. X--- 315,329 ----
  454. X      if(rank0 >= rank) if(!done_stopprint)
  455. X          (void) outentry(0, t0, 1);
  456. X      (void) fclose(rfile);
  457. X+ #ifdef VMS
  458. X+     if (flg) {
  459. X+         delete(RECORD);
  460. X+         rename(recfile, RECORD);
  461. X+     }
  462. X+ # undef unlink
  463. X+ #endif
  464. X  unlock:    ;
  465. X! #if defined(UNIX) || defined(VMS)
  466. X  # ifdef NO_FILE_LINKS
  467. X      (void) close(lockfd) ;
  468. X  # endif
  469. X***************
  470. X*** 693,701 ****
  471. X      } else {
  472. X          otmp->corpsenm = classmon(tt->plchar, (tt->sex == 'F'));
  473. X          otmp->owt = weight(otmp);
  474. X!         /* Note: oname() is safe since otmp is first in chain */
  475. X          otmp = oname(otmp, tt->name, 0);
  476. X          fobj = otmp;
  477. X          free((genericptr_t) tt);
  478. X          return otmp;
  479. X      }
  480. X--- 720,729 ----
  481. X      } else {
  482. X          otmp->corpsenm = classmon(tt->plchar, (tt->sex == 'F'));
  483. X          otmp->owt = weight(otmp);
  484. X!         /* Note: oname() is safe since otmp is first in chains */
  485. X          otmp = oname(otmp, tt->name, 0);
  486. X          fobj = otmp;
  487. X+         level.objects[otmp->ox][otmp->oy] = otmp;
  488. X          free((genericptr_t) tt);
  489. X          return otmp;
  490. X      }
  491. X*** src/Old/trap.c    Wed Sep 27 12:22:04 1989
  492. X--- src/trap.c    Mon Sep 25 21:30:24 1989
  493. X***************
  494. X*** 101,109 ****
  495. X      boolean    tmp1, tmp2, tmp3;
  496. X  #  ifdef POLYSELF
  497. X      tmp1 = isok(x,y) && (!IS_ROCK(levl[x][y].typ) ||
  498. X!         passes_walls(uasmon)) && !levl[x][y].mmask;
  499. X  #  else
  500. X!     tmp1 = isok(x,y) && !IS_ROCK(levl[x][y].typ) && !levl[x][y].mmask;
  501. X  #  endif
  502. X      tmp2 = !sobj_at(BOULDER,x,y) && !t_at(x,y);
  503. X      tmp3 = !(is_pool(x,y) &&
  504. X--- 101,109 ----
  505. X      boolean    tmp1, tmp2, tmp3;
  506. X  #  ifdef POLYSELF
  507. X      tmp1 = isok(x,y) && (!IS_ROCK(levl[x][y].typ) ||
  508. X!         passes_walls(uasmon)) && !MON_AT(x, y);
  509. X  #  else
  510. X!     tmp1 = isok(x,y) && !IS_ROCK(levl[x][y].typ) && !MON_AT(x, y);
  511. X  #  endif
  512. X      tmp2 = !sobj_at(BOULDER,x,y) && !t_at(x,y);
  513. X      tmp3 = !(is_pool(x,y) &&
  514. X***************
  515. X*** 122,128 ****
  516. X  #  else
  517. X          !IS_ROCK(levl[x][y].typ) &&
  518. X  #  endif
  519. X!         !levl[x][y].mmask &&
  520. X          !sobj_at(BOULDER,x,y) && !t_at(x,y) &&
  521. X          !(is_pool(x,y) &&
  522. X          !(Levitation || Wwalking
  523. X--- 122,128 ----
  524. X  #  else
  525. X          !IS_ROCK(levl[x][y].typ) &&
  526. X  #  endif
  527. X!         !MON_AT(x, y) &&
  528. X          !sobj_at(BOULDER,x,y) && !t_at(x,y) &&
  529. X          !(is_pool(x,y) &&
  530. X          !(Levitation || Wwalking
  531. X***************
  532. X*** 206,211 ****
  533. X--- 206,212 ----
  534. X  #endif
  535. X              break;
  536. X          case STATUE_TRAP:
  537. X+             deltrap(trap);
  538. X              for(otmp=fobj; otmp; otmp=otmp->nobj) {
  539. X              if(otmp->otyp == STATUE && otmp->ox == u.ux &&
  540. X                  otmp->oy == u.uy && otmp->corpsenm == trap->pm)
  541. X***************
  542. X*** 215,221 ****
  543. X                  break;
  544. X                  }
  545. X              }
  546. X-             deltrap(trap);
  547. X              break;
  548. X          case MONST_TRAP:
  549. X              if(mtmp=makemon(&mons[trap->pm],u.ux,u.uy)) {
  550. X--- 216,221 ----
  551. X***************
  552. X*** 226,232 ****
  553. X                  if(uarmh)
  554. X                  pline("Its blow glances off your helmet.");
  555. X                  else
  556. X!                 (void) thitu(3,d(4,6),"falling piercer");
  557. X                  break;
  558. X              default:    /* monster surprises you. */
  559. X                  pline("%s attacks you by surprise!",
  560. X--- 226,233 ----
  561. X                  if(uarmh)
  562. X                  pline("Its blow glances off your helmet.");
  563. X                  else
  564. X!                 (void) thitu(3,d(4,6),(struct obj *)0,
  565. X!                     "falling piercer");
  566. X                  break;
  567. X              default:    /* monster surprises you. */
  568. X                  pline("%s attacks you by surprise!",
  569. X***************
  570. X*** 238,244 ****
  571. X              break;
  572. X          case ARROW_TRAP:
  573. X              pline("An arrow shoots out at you!");
  574. X!             if(!thitu(8,rnd(6),"arrow")){
  575. X              (void) mksobj_at(ARROW, u.ux, u.uy);
  576. X              fobj->quan = 1;
  577. X              fobj->owt = weight(fobj);
  578. X--- 239,245 ----
  579. X              break;
  580. X          case ARROW_TRAP:
  581. X              pline("An arrow shoots out at you!");
  582. X!             if(!thitu(8,rnd(6),(struct obj *)0,"arrow")){
  583. X              (void) mksobj_at(ARROW, u.ux, u.uy);
  584. X              fobj->quan = 1;
  585. X              fobj->owt = weight(fobj);
  586. X***************
  587. X*** 294,300 ****
  588. X              break;
  589. X          case DART_TRAP:
  590. X              pline("A little dart shoots out at you!");
  591. X!             if(thitu(7,rnd(3),"little dart")) {
  592. X              if(!rn2(6)) poisoned("dart",A_CON,"poison dart");
  593. X              } else {
  594. X              (void) mksobj_at(DART, u.ux, u.uy);
  595. X--- 295,301 ----
  596. X              break;
  597. X          case DART_TRAP:
  598. X              pline("A little dart shoots out at you!");
  599. X!             if(thitu(7,rnd(3),(struct obj *)0,"little dart")) {
  600. X              if(!rn2(6)) poisoned("dart",A_CON,"poison dart");
  601. X              } else {
  602. X              (void) mksobj_at(DART, u.ux, u.uy);
  603. X***************
  604. X*** 1122,1132 ****
  605. X          } while(!digit(buf[0]) && (buf[0] != '-' || !digit(buf[1])));
  606. X          newlevel = atoi(buf);
  607. X      } else {
  608. X-         newlevel = rn2(5) | !Fire_resistance ? rnd(dlevel + 3) :
  609. X  #ifdef STRONGHOLD
  610. X!         stronghold_level + 1;
  611. X  #else
  612. X!         HELLLEVEL;
  613. X  #endif
  614. X          if(dlevel == newlevel)
  615. X          if(is_maze_lev) newlevel--; else newlevel++;
  616. X--- 1123,1136 ----
  617. X          } while(!digit(buf[0]) && (buf[0] != '-' || !digit(buf[1])));
  618. X          newlevel = atoi(buf);
  619. X      } else {
  620. X  #ifdef STRONGHOLD
  621. X!         /* We cannot send them to Hell if STRONGHOLD is defined, since
  622. X!          * they may find themselves trapped on the other side of the
  623. X!          * stronghold...
  624. X!          */
  625. X!         newlevel = rn2(5) ? rnd(dlevel + 3) : rnd(stronghold_level);
  626. X  #else
  627. X!         newlevel = rn2(5) || !Fire_resistance ? rnd(dlevel + 3) : HELLLEVEL;
  628. X  #endif
  629. X          if(dlevel == newlevel)
  630. X          if(is_maze_lev) newlevel--; else newlevel++;
  631. X***************
  632. X*** 1259,1265 ****
  633. X                 /* below pline added by GAN 10/30/86 */
  634. X                 adjattrib(A_CHA,1,FALSE);
  635. X                 for(i = -1; i <= 1; i++) for(j = -1; j <= 1; j++)
  636. X!                if(levl[u.ux+i][u.uy+j].mmask)
  637. X                 (void) tamedog(m_at(u.ux+i, u.uy+j), (struct obj *)0);
  638. X                 break;
  639. X             }
  640. X--- 1263,1269 ----
  641. X                 /* below pline added by GAN 10/30/86 */
  642. X                 adjattrib(A_CHA,1,FALSE);
  643. X                 for(i = -1; i <= 1; i++) for(j = -1; j <= 1; j++)
  644. X!                if(MON_AT(u.ux+i, u.uy+j))
  645. X                 (void) tamedog(m_at(u.ux+i, u.uy+j), (struct obj *)0);
  646. X                 break;
  647. X             }
  648. X***************
  649. X*** 1289,1295 ****
  650. X  
  651. X      /* Scrolls and potions get affected by the water */
  652. X      for(obj = invent; obj; obj = obj->nobj) {
  653. X!         if(obj->olet == SCROLL_SYM && rn2(12) > u.uluck)
  654. X              obj->otyp = SCR_BLANK_PAPER;
  655. X          if(obj->olet == POTION_SYM && rn2(12) > u.uluck) {
  656. X              if (obj->spe == -1) {
  657. X--- 1293,1303 ----
  658. X  
  659. X      /* Scrolls and potions get affected by the water */
  660. X      for(obj = invent; obj; obj = obj->nobj) {
  661. X!         if(obj->olet == SCROLL_SYM && rn2(12) > u.uluck
  662. X! #ifdef MAIL
  663. X!             && obj->otyp != SCR_MAIL
  664. X! #endif
  665. X!                                 )
  666. X              obj->otyp = SCR_BLANK_PAPER;
  667. X          if(obj->olet == POTION_SYM && rn2(12) > u.uluck) {
  668. X              if (obj->spe == -1) {
  669. X***************
  670. X*** 1458,1465 ****
  671. X      }
  672. X  }
  673. X  
  674. X! /* this is only called when the player is doing something to the chest
  675. X!  * -- i.e., the player and the chest are in the same position */
  676. X  void
  677. X  chest_trap(obj, bodypart)
  678. X  register struct obj *obj;
  679. X--- 1466,1472 ----
  680. X      }
  681. X  }
  682. X  
  683. X! /* only called when the player is doing something to the chest directly */
  684. X  void
  685. X  chest_trap(obj, bodypart)
  686. X  register struct obj *obj;
  687. X*** src/Old/u_init.c    Wed Sep 27 12:22:58 1989
  688. X--- src/u_init.c    Mon Sep 25 22:54:56 1989
  689. X***************
  690. X*** 93,98 ****
  691. X--- 93,103 ----
  692. X      { POT_HEALING, 0, POTION_SYM, 4, 1, UNDEF_BLESS },
  693. X      { POT_EXTRA_HEALING, 0, POTION_SYM, 4, 1, UNDEF_BLESS },
  694. X      { WAN_SLEEP, UNDEF_SPE, WAND_SYM, 1, 1, UNDEF_BLESS },
  695. X+ #ifdef SPELLS
  696. X+     /* always blessed, so it's guaranteed readable */
  697. X+     { SPE_HEALING, 0, SPBOOK_SYM, 1, 1, 1 },
  698. X+     { SPE_EXTRA_HEALING, 0, SPBOOK_SYM, 1, 1, 1 },
  699. X+ #endif
  700. X      { APPLE, 0, FOOD_SYM, 5, 1, 0 },
  701. X      { 0, 0, 0, 0, 0, 0 }
  702. X  };
  703. X***************
  704. X*** 542,553 ****
  705. X           */
  706. X          if (undefined) {
  707. X  #ifdef POLYSELF
  708. X!             int nocreate = STRANGE_OBJECT;
  709. X  #  ifdef SPELLS
  710. X!             int nocreate2 = STRANGE_OBJECT;
  711. X  #  endif
  712. X  #endif
  713. X!             int nocreate3 = STRANGE_OBJECT;
  714. X  
  715. X              while(obj->otyp == WAN_WISHING
  716. X  #ifdef POLYSELF
  717. X--- 547,558 ----
  718. X           */
  719. X          if (undefined) {
  720. X  #ifdef POLYSELF
  721. X!             static unsigned nocreate = STRANGE_OBJECT;
  722. X  #  ifdef SPELLS
  723. X!             static unsigned nocreate2 = STRANGE_OBJECT;
  724. X  #  endif
  725. X  #endif
  726. X!             static unsigned nocreate3 = STRANGE_OBJECT;
  727. X  
  728. X              while(obj->otyp == WAN_WISHING
  729. X  #ifdef POLYSELF
  730. X***************
  731. X*** 601,607 ****
  732. X          }
  733. X  
  734. X          obj->bknown = trop->trknown;
  735. X!         if(uses_known(obj)) obj->known = trop->trknown;
  736. X          /* not obj->dknown = 1; - let him look at it at least once */
  737. X          obj->cursed = 0;
  738. X          if(obj->olet == TOOL_SYM){ /* problem with multiple tools */
  739. X--- 606,612 ----
  740. X          }
  741. X  
  742. X          obj->bknown = trop->trknown;
  743. X!         if(objects[obj->otyp].oc_uses_known) obj->known = trop->trknown;
  744. X          /* not obj->dknown = 1; - let him look at it at least once */
  745. X          obj->cursed = 0;
  746. X          if(obj->olet == TOOL_SYM){ /* problem with multiple tools */
  747. X*** src/Old/uhitm.c    Wed Sep 27 12:23:32 1989
  748. X--- src/uhitm.c    Mon Sep 25 23:01:15 1989
  749. X***************
  750. X*** 26,32 ****
  751. X      mm.x = mon->mx;
  752. X      mm.y = mon->my;
  753. X      enexto(&mm, mm.x, mm.y, mon->data);
  754. X!     if (levl[mm.x][mm.y].mmask || mon->mhp <= 1) return (struct monst *)0;
  755. X      m2 = newmonst(0);
  756. X      *m2 = *mon;            /* copy condition of old monster */
  757. X      m2->nmon = fmon;
  758. X--- 26,32 ----
  759. X      mm.x = mon->mx;
  760. X      mm.y = mon->my;
  761. X      enexto(&mm, mm.x, mm.y, mon->data);
  762. X!     if (MON_AT(mm.x, mm.y) || mon->mhp <= 1) return (struct monst *)0;
  763. X      m2 = newmonst(0);
  764. X      *m2 = *mon;            /* copy condition of old monster */
  765. X      m2->nmon = fmon;
  766. X***************
  767. X*** 62,68 ****
  768. X      m2->mnamelth = 0;
  769. X      m2->mdispl = 0;
  770. X      pmon(m2);    /* display the new monster */
  771. X!     levl[m2->mx][m2->my].mmask = 1;
  772. X      if (mon->mtame) (void) tamedog(m2, (struct obj *)0);
  773. X      return m2;
  774. X  }
  775. X--- 62,68 ----
  776. X      m2->mnamelth = 0;
  777. X      m2->mdispl = 0;
  778. X      pmon(m2);    /* display the new monster */
  779. X!     place_monster(m2, m2->mx, m2->my);
  780. X      if (mon->mtame) (void) tamedog(m2, (struct obj *)0);
  781. X      return m2;
  782. X  }
  783. X***************
  784. X*** 98,104 ****
  785. X  
  786. X              if(Blind) pline("Wait!  There's a hidden monster there!");
  787. X              else if(OBJ_AT(mtmp->mx, mtmp->my)) {
  788. X!             if(obj = o_at(mtmp->mx,mtmp->my))
  789. X                  pline("Wait!  There's %s hiding under %s!",
  790. X                      defmonnam(mtmp), doname(obj));
  791. X              } else if (levl[mtmp->mx][mtmp->my].gmask == 1)
  792. X--- 98,104 ----
  793. X  
  794. X              if(Blind) pline("Wait!  There's a hidden monster there!");
  795. X              else if(OBJ_AT(mtmp->mx, mtmp->my)) {
  796. X!             if(obj = level.objects[mtmp->mx][mtmp->my])
  797. X                  pline("Wait!  There's %s hiding under %s!",
  798. X                      defmonnam(mtmp), doname(obj));
  799. X              } else if (levl[mtmp->mx][mtmp->my].gmask == 1)
  800. X***************
  801. X*** 317,326 ****
  802. X--- 317,331 ----
  803. X       * 7) Possibly kill monster (must be done after 6a, 6b)
  804. X       * 8) Instant-kill from poison (can happen anywhere between 5 and 9)
  805. X       * 9) Hands not glowing (must be done after 7 and 8)
  806. X+      * The major problem is that since we don't want a "hit" message
  807. X+      * when the monster dies, we have to know how much damage it did
  808. X+      * _before_ outputting a hit message, but any messages associated with
  809. X+      * the damage don't come out until _after_ outputting a hit message.
  810. X       */
  811. X      boolean hittxt = FALSE, destroyed = FALSE;
  812. X      boolean get_dmg_bonus = TRUE;
  813. X      boolean ispoisoned = FALSE, needpoismsg = FALSE, poiskilled = FALSE;
  814. X+     boolean silvermsg = FALSE;
  815. X  
  816. X      wakeup(mon);
  817. X      if(!obj) {
  818. X***************
  819. X*** 379,384 ****
  820. X--- 384,397 ----
  821. X                  obj->opoisoned)
  822. X                  ispoisoned = TRUE;
  823. X              }
  824. X+             if(thrown && obj->otyp == SILVER_ARROW) {
  825. X+             if (is_were(mon->data) || mon->data->mlet==S_VAMPIRE
  826. X+                 || (mon->data->mlet==S_IMP && mon->data != &mons[PM_TENGU])
  827. X+                 || is_demon(mon->data)) {
  828. X+                 silvermsg = TRUE;
  829. X+                 tmp += rnd(20);
  830. X+             }
  831. X+             }
  832. X          }
  833. X          } else if(obj->olet == POTION_SYM) {
  834. X              if (obj->quan > 1) setuwep(splitobj(obj, 1));
  835. X***************
  836. X*** 426,432 ****
  837. X                  kludge("You hit %s with the %s egg%s.",
  838. X                      mon_nam(mon),
  839. X                      mons[obj->corpsenm].mname,
  840. X!                     (obj->quan==1) ? "" : "s");
  841. X                  hittxt = TRUE;
  842. X                  pline("The egg%sn't live any more...",
  843. X                      (obj->quan==1) ? " is" : "s are");
  844. X--- 439,445 ----
  845. X                  kludge("You hit %s with the %s egg%s.",
  846. X                      mon_nam(mon),
  847. X                      mons[obj->corpsenm].mname,
  848. X!                     plur((long)obj->quan));
  849. X                  hittxt = TRUE;
  850. X                  pline("The egg%sn't live any more...",
  851. X                      (obj->quan==1) ? " is" : "s are");
  852. X***************
  853. X*** 557,565 ****
  854. X          else    You("hit %s%s", mon_nam(mon), exclam(tmp));
  855. X      }
  856. X  
  857. X      if (needpoismsg)
  858. X          kludge("The poison doesn't seem to affect %s.", mon_nam(mon));
  859. X- 
  860. X      if (poiskilled) {
  861. X          pline("The poison was deadly...");
  862. X          xkilled(mon, 0);
  863. X--- 570,585 ----
  864. X          else    You("hit %s%s", mon_nam(mon), exclam(tmp));
  865. X      }
  866. X  
  867. X+     if (silvermsg) {
  868. X+         if (cansee(mon->mx, mon->my))
  869. X+             pline("The silver arrow sears %s's flesh!",
  870. X+                 mon_nam(mon));
  871. X+         else
  872. X+             pline("Its flesh is seared!");
  873. X+     }
  874. X+ 
  875. X      if (needpoismsg)
  876. X          kludge("The poison doesn't seem to affect %s.", mon_nam(mon));
  877. X      if (poiskilled) {
  878. X          pline("The poison was deadly...");
  879. X          xkilled(mon, 0);
  880. X***************
  881. X*** 616,622 ****
  882. X          ) {
  883. X          struct monst *dtmp;
  884. X          pline("Some hell-p has arrived!");
  885. X- /*        if((dtmp = mkmon_at(uasmon, u.ux, u.uy)))*/
  886. X  /*        if((dtmp = makemon(uasmon, u.ux, u.uy)))*/
  887. X          if((dtmp = makemon(&mons[ndemon()], u.ux, u.uy)))
  888. X          (void)tamedog(dtmp, (struct obj *)0);
  889. X--- 636,641 ----
  890. X***************
  891. X*** 1088,1094 ****
  892. X                  sum[i] = damageum(mon,mattk);
  893. X              break;
  894. X          case AT_CLAW:
  895. X!             if (i==0 && uwep && humanoid(uasmon)) goto use_weapon;
  896. X  # ifdef SEDUCE
  897. X              /* succubi/incubi are humanoid, but their _second_
  898. X               * attack is AT_CLAW, not their first...
  899. X--- 1107,1113 ----
  900. X                  sum[i] = damageum(mon,mattk);
  901. X              break;
  902. X          case AT_CLAW:
  903. X!             if (i==0 && uwep && !cantwield(uasmon)) goto use_weapon;
  904. X  # ifdef SEDUCE
  905. X              /* succubi/incubi are humanoid, but their _second_
  906. X               * attack is AT_CLAW, not their first...
  907. X*** src/Old/unixmain.c    Wed Sep 27 12:24:30 1989
  908. X--- src/unixmain.c    Tue Sep 26 18:46:28 1989
  909. X***************
  910. X*** 1,7 ****
  911. X  /*    SCCS Id: @(#)unixmain.c    3.0    89/01/13
  912. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  913. X  /* NetHack may be freely redistributed.  See license for details. */
  914. X! /* main.c - (Unix) version */
  915. X  
  916. X  #include <signal.h>
  917. X  #include <pwd.h>
  918. X--- 1,7 ----
  919. X  /*    SCCS Id: @(#)unixmain.c    3.0    89/01/13
  920. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  921. X  /* NetHack may be freely redistributed.  See license for details. */
  922. X! /* main.c - Unix NetHack */
  923. X  
  924. X  #include <signal.h>
  925. X  #include <pwd.h>
  926. X***************
  927. X*** 8,35 ****
  928. X  
  929. X  #include "hack.h"
  930. X  
  931. X  int hackpid = 0;                /* current pid */
  932. X  int locknum = 0;                /* max num of players */
  933. X  #ifdef DEF_PAGER
  934. X  char *catmore = 0;                /* default pager */
  935. X  #endif
  936. X- char SAVEF[PL_NSIZ + 11] = "save/";    /* save/99999player */
  937. X- char *hname = 0;        /* name of the game (argv[0] of call) */
  938. X- char obuf[BUFSIZ];    /* BUFSIZ is defined in stdio.h */
  939. X  
  940. X! int (*occupation)() = DUMMY;
  941. X! int (*afternmv)() = DUMMY;
  942. X  #ifdef CHDIR
  943. X  static void chdirx();
  944. X  #endif /* CHDIR */
  945. X! static void whoami(), newgame();
  946. X  
  947. X  main(argc,argv)
  948. X  int argc;
  949. X  char *argv[];
  950. X  {
  951. X      struct passwd *pw;
  952. X-     extern struct passwd *getpwuid();
  953. X      extern int x_maze_max, y_maze_max;
  954. X      register int fd;
  955. X  #ifdef CHDIR
  956. X--- 8,35 ----
  957. X  
  958. X  #include "hack.h"
  959. X  
  960. X+ char SAVEF[PL_NSIZ + 11] = "save/";    /* save/99999player */
  961. X+ 
  962. X+ char *hname = 0;        /* name of the game (argv[0] of call) */
  963. X+ char obuf[BUFSIZ];    /* BUFSIZ is defined in stdio.h */
  964. X  int hackpid = 0;                /* current pid */
  965. X  int locknum = 0;                /* max num of players */
  966. X  #ifdef DEF_PAGER
  967. X  char *catmore = 0;                /* default pager */
  968. X  #endif
  969. X  
  970. X! extern struct passwd *getpwuid();
  971. X  #ifdef CHDIR
  972. X  static void chdirx();
  973. X  #endif /* CHDIR */
  974. X! static void whoami();
  975. X  
  976. X+ int
  977. X  main(argc,argv)
  978. X  int argc;
  979. X  char *argv[];
  980. X  {
  981. X      struct passwd *pw;
  982. X      extern int x_maze_max, y_maze_max;
  983. X      register int fd;
  984. X  #ifdef CHDIR
  985. X***************
  986. X*** 38,47 ****
  987. X--- 38,62 ----
  988. X  #ifdef COMPRESS
  989. X      char    cmd[80], old[80];
  990. X  #endif
  991. X+ 
  992. X      hname = argv[0];
  993. X      hackpid = getpid();
  994. X      (void) umask(0);
  995. X  
  996. X+     /*
  997. X+      *  Remember tty modes, to be restored on exit.
  998. X+      *
  999. X+      *  gettty() must be called before startup()
  1000. X+      *    due to ordering of LI/CO settings
  1001. X+      *  startup() must be called before initoptions()
  1002. X+      *    due to ordering of graphics settings
  1003. X+      */
  1004. X+     gettty();
  1005. X+     setbuf(stdout,obuf);
  1006. X+     startup();
  1007. X+     initoptions();
  1008. X+     whoami();
  1009. X+ 
  1010. X  #ifdef CHDIR            /* otherwise no chdir() */
  1011. X      /*
  1012. X       * See if we must change directory to the playground.
  1013. X***************
  1014. X*** 50,58 ****
  1015. X       * The environment variable HACKDIR is overridden by a
  1016. X       *  -d command line option (must be the first option given)
  1017. X       */
  1018. X- 
  1019. X      dir = getenv("HACKDIR");
  1020. X!     if(argc > 1 && !strncmp(argv[1], "-d", 2)) {
  1021. X          argc--;
  1022. X          argv++;
  1023. X          dir = argv[0]+2;
  1024. X--- 65,75 ----
  1025. X       * The environment variable HACKDIR is overridden by a
  1026. X       *  -d command line option (must be the first option given)
  1027. X       */
  1028. X      dir = getenv("HACKDIR");
  1029. X! #endif
  1030. X!     if(argc > 1) {
  1031. X! #ifdef CHDIR
  1032. X!         if (!strncmp(argv[1], "-d", 2)) {
  1033. X          argc--;
  1034. X          argv++;
  1035. X          dir = argv[0]+2;
  1036. X***************
  1037. X*** 64,101 ****
  1038. X          }
  1039. X          if(!*dir)
  1040. X              error("Flag -d must be followed by a directory name.");
  1041. X!     }
  1042. X  #endif /* CHDIR /**/
  1043. X  
  1044. X      /*
  1045. X-      *  Remember tty modes, to be restored on exit.
  1046. X-      *
  1047. X-      *  Note that getty() must be called before startup() due to ordering
  1048. X-      *  of LI/CO settings, and startup() must be called before initoptions()
  1049. X-      *  due to ordering of graphics settings.
  1050. X-      */
  1051. X-     gettty();
  1052. X-     startup();
  1053. X-     initoptions();
  1054. X-     whoami();
  1055. X-     /*
  1056. X       * Now we know the directory containing 'record' and
  1057. X       * may do a prscore().
  1058. X       */
  1059. X!     if(argc > 1 && !strncmp(argv[1], "-s", 2)) {
  1060. X  #ifdef CHDIR
  1061. X          chdirx(dir,0);
  1062. X  #endif
  1063. X          prscore(argc, argv);
  1064. X!         getret();
  1065. X          settty(NULL);
  1066. X          exit(0);
  1067. X      }
  1068. X  
  1069. X      /*
  1070. X!      * It seems he really wants to play.
  1071. X       */
  1072. X-     setbuf(stdout,obuf);
  1073. X      setrandom();
  1074. X      cls();
  1075. X      u.uhp = 1;    /* prevent RIP on early quits */
  1076. X--- 81,107 ----
  1077. X          }
  1078. X          if(!*dir)
  1079. X              error("Flag -d must be followed by a directory name.");
  1080. X!         } else
  1081. X  #endif /* CHDIR /**/
  1082. X  
  1083. X      /*
  1084. X       * Now we know the directory containing 'record' and
  1085. X       * may do a prscore().
  1086. X       */
  1087. X!         if (!strncmp(argv[1], "-s", 2)) {
  1088. X  #ifdef CHDIR
  1089. X          chdirx(dir,0);
  1090. X  #endif
  1091. X          prscore(argc, argv);
  1092. X!         if(isatty(1)) getret();
  1093. X          settty(NULL);
  1094. X          exit(0);
  1095. X+         }
  1096. X      }
  1097. X  
  1098. X      /*
  1099. X!      * It seems you really want to play.
  1100. X       */
  1101. X      setrandom();
  1102. X      cls();
  1103. X      u.uhp = 1;    /* prevent RIP on early quits */
  1104. X***************
  1105. X*** 123,140 ****
  1106. X          argc--;
  1107. X          switch(argv[0][1]){
  1108. X  #if defined(WIZARD) || defined(EXPLORE_MODE)
  1109. X!         case 'D':
  1110. X          case 'X':
  1111. X!             pw = getpwuid(getuid());
  1112. X  # ifdef WIZARD
  1113. X!             if(!strcmp(pw->pw_name, WIZARD))
  1114. X                  wizard = TRUE;
  1115. X! # endif
  1116. X! # if defined(WIZARD) && defined(EXPLORE_MODE)
  1117. X!             else
  1118. X  # endif
  1119. X  # ifdef EXPLORE_MODE
  1120. X!                 discover = TRUE;
  1121. X  # endif
  1122. X              break;
  1123. X  #endif
  1124. X--- 129,149 ----
  1125. X          argc--;
  1126. X          switch(argv[0][1]){
  1127. X  #if defined(WIZARD) || defined(EXPLORE_MODE)
  1128. X! # ifndef EXPLORE_MODE
  1129. X          case 'X':
  1130. X! # endif
  1131. X!         case 'D':
  1132. X  # ifdef WIZARD
  1133. X!             pw = getpwuid(getuid());
  1134. X!             if(!strcmp(pw->pw_name, WIZARD)) {
  1135. X                  wizard = TRUE;
  1136. X!                 break;
  1137. X!             }
  1138. X!             /* otherwise fall thru to discover */
  1139. X  # endif
  1140. X  # ifdef EXPLORE_MODE
  1141. X!         case 'X':
  1142. X!             discover = TRUE;
  1143. X  # endif
  1144. X              break;
  1145. X  #endif
  1146. X***************
  1147. X*** 176,182 ****
  1148. X      getmailstatus();
  1149. X  #endif
  1150. X  #ifdef WIZARD
  1151. X!     if(wizard) Strcpy(plname, "wizard"); else
  1152. X  #endif
  1153. X      if(!*plname || !strncmp(plname, "player", 4)
  1154. X              || !strncmp(plname, "games", 4))
  1155. X--- 185,193 ----
  1156. X      getmailstatus();
  1157. X  #endif
  1158. X  #ifdef WIZARD
  1159. X!     if (wizard)
  1160. X!         Strcpy(plname, "wizard");
  1161. X!     else
  1162. X  #endif
  1163. X      if(!*plname || !strncmp(plname, "player", 4)
  1164. X              || !strncmp(plname, "games", 4))
  1165. X***************
  1166. X*** 202,217 ****
  1167. X  #endif /* WIZARD /**/
  1168. X      setftty();
  1169. X  
  1170. X!     /* 
  1171. X       * Initialisation of the boundaries of the mazes
  1172. X       * Both boundaries have to be even.
  1173. X       */
  1174. X!      
  1175. X      x_maze_max = COLNO-1;
  1176. X!     if (x_maze_max % 2) 
  1177. X          x_maze_max--;
  1178. X      y_maze_max = ROWNO-1;
  1179. X!     if (y_maze_max % 2) 
  1180. X          y_maze_max--;
  1181. X  
  1182. X      /* initialize static monster strength array */
  1183. X--- 213,228 ----
  1184. X  #endif /* WIZARD /**/
  1185. X      setftty();
  1186. X  
  1187. X!     /*
  1188. X       * Initialisation of the boundaries of the mazes
  1189. X       * Both boundaries have to be even.
  1190. X       */
  1191. X! 
  1192. X      x_maze_max = COLNO-1;
  1193. X!     if (x_maze_max % 2)
  1194. X          x_maze_max--;
  1195. X      y_maze_max = ROWNO-1;
  1196. X!     if (y_maze_max % 2)
  1197. X          y_maze_max--;
  1198. X  
  1199. X      /* initialize static monster strength array */
  1200. X***************
  1201. X*** 237,247 ****
  1202. X--- 248,267 ----
  1203. X  #endif
  1204. X      if((fd = open(SAVEF,0)) >= 0 &&
  1205. X         (uptodate(fd) || unlink(SAVEF) == 666)) {
  1206. X+ #ifdef WIZARD
  1207. X+         /* Since wizard is actually flags.debug, restoring might
  1208. X+          * overwrite it.
  1209. X+          */
  1210. X+         boolean remember_wiz_mode = wizard;
  1211. X+ #endif
  1212. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  1213. X          pline("Restoring old save file...");
  1214. X          (void) fflush(stdout);
  1215. X          if(!dorecover(fd))
  1216. X              goto not_recovered;
  1217. X+ #ifdef WIZARD
  1218. X+         if(!wizard && remember_wiz_mode) wizard = TRUE;
  1219. X+ #endif
  1220. X          pline("Hello %s, welcome to NetHack!", plname);
  1221. X          /* get shopkeeper set properly if restore is in shop */
  1222. X          (void) inshop();
  1223. X***************
  1224. X*** 282,443 ****
  1225. X  
  1226. X      initrack();
  1227. X  
  1228. X!     for(;;) {
  1229. X!         if(flags.move) {    /* actual time passed */
  1230. X! 
  1231. X! #ifdef SOUNDS
  1232. X!             dosounds();
  1233. X! #endif
  1234. X!             settrack();
  1235. X! 
  1236. X!             if(moves%2 == 0 ||
  1237. X!               (!(Fast & ~INTRINSIC) && (!Fast || rn2(3)))) {
  1238. X!                 movemon();
  1239. X! #ifdef HARD
  1240. X!                 if(!rn2(u.udemigod?25:(dlevel>30)?50:70))
  1241. X! #else
  1242. X!                 if(!rn2(70))
  1243. X! #endif
  1244. X!                     (void) makemon((struct permonst *)0, 0, 0);
  1245. X!             }
  1246. X!             if(Glib) glibr();
  1247. X!             timeout();
  1248. X!             ++moves;
  1249. X! #ifdef THEOLOGY
  1250. X!             if (u.ublesscnt)  u.ublesscnt--;
  1251. X! #endif
  1252. X!             if(flags.time) flags.botl = 1;
  1253. X! #ifdef POLYSELF
  1254. X!             if(u.mtimedone)
  1255. X!                 if(u.mh < 1) rehumanize();
  1256. X!             else
  1257. X! #endif
  1258. X!                 if(u.uhp < 1) {
  1259. X!                 You("die...");
  1260. X!                 done(DIED);
  1261. X!                 }
  1262. X! #ifdef POLYSELF
  1263. X!             if (u.mtimedone) {
  1264. X!                 if (u.mh < u.mhmax) {
  1265. X!                 if (Regeneration || !(moves%20)) {
  1266. X!                     flags.botl = 1;
  1267. X!                     u.mh++;
  1268. X!                 }
  1269. X!                 }
  1270. X!             }
  1271. X! #endif
  1272. X!             if(u.uhp < u.uhpmax) {
  1273. X!                 if(u.ulevel > 9) {
  1274. X!                     int heal;
  1275. X! 
  1276. X!                     if(HRegeneration || !(moves%3)) {
  1277. X!                     flags.botl = 1;
  1278. X!                     if (ACURR(A_CON) <= 12) heal = 1;
  1279. X!                     else heal = rnd((int) ACURR(A_CON)-12);
  1280. X!                     if (heal > u.ulevel-9) heal = u.ulevel-9;
  1281. X!                     u.uhp += heal;
  1282. X!                     if(u.uhp > u.uhpmax)
  1283. X!                         u.uhp = u.uhpmax;
  1284. X!                     }
  1285. X!                 } else if(HRegeneration ||
  1286. X!                       (!(moves%((MAXULEV+12)/(u.ulevel+2)+1)))) {
  1287. X!                     flags.botl = 1;
  1288. X!                     u.uhp++;
  1289. X!                 }
  1290. X!             }
  1291. X! #ifdef SPELLS
  1292. X!             if ((u.uen<u.uenmax) && (!(moves%(19-ACURR(A_INT)/2)))) {
  1293. X!                 u.uen += rn2((int)ACURR(A_WIS)/5 + 1) + 1;
  1294. X!                 if (u.uen > u.uenmax)  u.uen = u.uenmax;
  1295. X!                 flags.botl = 1;
  1296. X!             }
  1297. X! #endif
  1298. X!             if(Teleportation && !rn2(85)) tele();
  1299. X! #ifdef POLYSELF
  1300. X!             if(Polymorph && !rn2(100)) polyself();
  1301. X!             if(u.ulycn >= 0 && !rn2(80 - (20 * night())))
  1302. X!                 you_were();
  1303. X! #endif
  1304. X!             if(Searching && multi >= 0) (void) dosearch0(1);
  1305. X!             hatch_eggs();
  1306. X!             gethungry();
  1307. X!             invault();
  1308. X!             amulet();
  1309. X! #ifdef HARD
  1310. X!             if (!rn2(40+(int)(ACURR(A_DEX)*3))) u_wipe_engr(rnd(3));
  1311. X!             if (u.udemigod) {
  1312. X! 
  1313. X!                 if(u.udg_cnt) u.udg_cnt--;
  1314. X!                 if(!u.udg_cnt) {
  1315. X! 
  1316. X!                     intervene();
  1317. X!                     u.udg_cnt = rn1(200, 50);
  1318. X!                 }
  1319. X!             }
  1320. X! #endif
  1321. X!             restore_attrib();
  1322. X!         }
  1323. X!         if(multi < 0) {
  1324. X!             if(!++multi){
  1325. X!                 pline(nomovemsg ? nomovemsg :
  1326. X!                     "You can move again.");
  1327. X!                 nomovemsg = 0;
  1328. X!                 if(afternmv) (*afternmv)();
  1329. X!                 afternmv = 0;
  1330. X!             }
  1331. X!         }
  1332. X! 
  1333. X!         find_ac();
  1334. X!         if(!flags.mv || Blind)
  1335. X!         {
  1336. X!             seeobjs();
  1337. X!             seemons();
  1338. X!             seeglds();
  1339. X!             nscr();
  1340. X!         }
  1341. X!         if(flags.botl || flags.botlx) bot();
  1342. X! 
  1343. X!         flags.move = 1;
  1344. X! 
  1345. X!         if(multi >= 0 && occupation) {
  1346. X! 
  1347. X!             if(monster_nearby())
  1348. X!                 stop_occupation();
  1349. X!             else if ((*occupation)() == 0)
  1350. X!                 occupation = 0;
  1351. X!             continue;
  1352. X!         }
  1353. X! 
  1354. X!         if((u.uhave_amulet || Clairvoyant) && 
  1355. X! #ifdef ENDGAME
  1356. X!             dlevel != ENDLEVEL &&
  1357. X! #endif
  1358. X!             !(moves%15) && !rn2(2)) do_vicinity_map();
  1359. X! 
  1360. X!         u.umoved = FALSE;
  1361. X!         if(multi > 0) {
  1362. X!             lookaround();
  1363. X!             if(!multi) {    /* lookaround may clear multi */
  1364. X!                 flags.move = 0;
  1365. X!                 continue;
  1366. X!             }
  1367. X!             if(flags.mv) {
  1368. X!                 if(multi < COLNO && !--multi)
  1369. X!                     flags.mv = flags.run = 0;
  1370. X!                 domove();
  1371. X!             } else {
  1372. X!                 --multi;
  1373. X!                 rhack(save_cm);
  1374. X!             }
  1375. X!         } else if(multi == 0) {
  1376. X! #ifdef MAIL
  1377. X!             ckmailstatus();
  1378. X! #endif
  1379. X!             rhack(NULL);
  1380. X!         }
  1381. X!         if(multi && multi%7 == 0)
  1382. X!             (void) fflush(stdout);
  1383. X!     }
  1384. X  }
  1385. X  
  1386. X  void
  1387. X--- 302,309 ----
  1388. X  
  1389. X      initrack();
  1390. X  
  1391. X!     moveloop();
  1392. X!     return(0);
  1393. X  }
  1394. X  
  1395. X  void
  1396. X***************
  1397. X*** 458,469 ****
  1398. X   * It may still contain a suffix denoting pl_character.
  1399. X   */
  1400. X  void
  1401. X! askname(){
  1402. X! register int c,ct;
  1403. X      Printf("\nWho are you? ");
  1404. X      (void) fflush(stdout);
  1405. X      ct = 0;
  1406. X!     while((c = Getchar()) != '\n'){
  1407. X          if(c == EOF) error("End of input\n");
  1408. X          /* some people get confused when their erase char is not ^H */
  1409. X          if(c == '\010') {
  1410. X--- 324,336 ----
  1411. X   * It may still contain a suffix denoting pl_character.
  1412. X   */
  1413. X  void
  1414. X! askname() {
  1415. X!     register int c, ct;
  1416. X! 
  1417. X      Printf("\nWho are you? ");
  1418. X      (void) fflush(stdout);
  1419. X      ct = 0;
  1420. X!     while((c = Getchar()) != '\n') {
  1421. X          if(c == EOF) error("End of input\n");
  1422. X          /* some people get confused when their erase char is not ^H */
  1423. X          if(c == '\010') {
  1424. X***************
  1425. X*** 472,492 ****
  1426. X          }
  1427. X          if(c != '-')
  1428. X          if(c < 'A' || (c > 'Z' && c < 'a') || c > 'z') c = '_';
  1429. X!         if(ct < sizeof(plname)-1) plname[ct++] = c;
  1430. X      }
  1431. X      plname[ct] = 0;
  1432. X      if(ct == 0) askname();
  1433. X  }
  1434. X  
  1435. X- /*VARARGS1*/
  1436. X- void
  1437. X- impossible(s,x1,x2)
  1438. X- register char *s, *x1, *x2;
  1439. X- {
  1440. X-     pline(s,x1,x2);
  1441. X-     pline("Program in disorder - perhaps you'd better Quit.");
  1442. X- }
  1443. X- 
  1444. X  #ifdef CHDIR
  1445. X  static void
  1446. X  chdirx(dir, wr)
  1447. X--- 339,351 ----
  1448. X          }
  1449. X          if(c != '-')
  1450. X          if(c < 'A' || (c > 'Z' && c < 'a') || c > 'z') c = '_';
  1451. X!         if(ct < sizeof(plname)-1)
  1452. X!             plname[ct++] = c;
  1453. X      }
  1454. X      plname[ct] = 0;
  1455. X      if(ct == 0) askname();
  1456. X  }
  1457. X  
  1458. X  #ifdef CHDIR
  1459. X  static void
  1460. X  chdirx(dir, wr)
  1461. X***************
  1462. X*** 515,521 ****
  1463. X          error("Cannot chdir to %s.", dir);
  1464. X      }
  1465. X  
  1466. X!     /* warn the player if he cannot write the record file */
  1467. X      /* perhaps we should also test whether . is writable */
  1468. X      /* unfortunately the access systemcall is worthless */
  1469. X      if(wr) {
  1470. X--- 374,380 ----
  1471. X          error("Cannot chdir to %s.", dir);
  1472. X      }
  1473. X  
  1474. X!     /* warn the player if we can't write the record file */
  1475. X      /* perhaps we should also test whether . is writable */
  1476. X      /* unfortunately the access systemcall is worthless */
  1477. X      if(wr) {
  1478. X***************
  1479. X*** 532,550 ****
  1480. X  }
  1481. X  #endif /* CHDIR /**/
  1482. X  
  1483. X- void
  1484. X- stop_occupation()
  1485. X- {
  1486. X-     if(occupation) {
  1487. X-         You("stop %s.", occtxt);
  1488. X-         occupation = 0;
  1489. X- #ifdef REDO
  1490. X-         multi = 0;
  1491. X-         pushch(0);        
  1492. X- #endif
  1493. X-     }
  1494. X- }
  1495. X- 
  1496. X  static void
  1497. X  whoami() {
  1498. X      /*
  1499. X--- 391,396 ----
  1500. X***************
  1501. X*** 555,561 ****
  1502. X       * If everything fails, or if the resulting name is some generic
  1503. X       * account like "games", "play", "player", "hack" then eventually
  1504. X       * we'll ask him.
  1505. X!      * Note that we trust him here; it is possible to play under
  1506. X       * somebody else's name.
  1507. X       */
  1508. X      register char *s;
  1509. X--- 401,407 ----
  1510. X       * If everything fails, or if the resulting name is some generic
  1511. X       * account like "games", "play", "player", "hack" then eventually
  1512. X       * we'll ask him.
  1513. X!      * Note that we trust the user here; it is possible to play under
  1514. X       * somebody else's name.
  1515. X       */
  1516. X      register char *s;
  1517. X***************
  1518. X*** 566,607 ****
  1519. X          (void) strncpy(plname, s, sizeof(plname)-1);
  1520. X      if(!*plname && (s = getlogin()))
  1521. X          (void) strncpy(plname, s, sizeof(plname)-1);
  1522. X- }
  1523. X- 
  1524. X- static void
  1525. X- newgame() {
  1526. X-     fobj = fcobj = invent = 0;
  1527. X-     fmon = fallen_down = 0;
  1528. X-     ftrap = 0;
  1529. X-     fgold = 0;
  1530. X-     flags.ident = 1;
  1531. X- 
  1532. X-     init_objects();
  1533. X-     u_init();
  1534. X- 
  1535. X-     (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  1536. X- 
  1537. X-     mklev();
  1538. X-     u.ux = xupstair;
  1539. X-     u.uy = yupstair;
  1540. X-     (void) inshop();
  1541. X- 
  1542. X-     setsee();
  1543. X-     flags.botlx = 1;
  1544. X- 
  1545. X-     /* Move the monster from under you or else
  1546. X-      * makedog() will fail when it calls makemon().
  1547. X-      *             - ucsfcgl!kneller
  1548. X-      */
  1549. X-     if(levl[u.ux][u.uy].mmask) mnexto(m_at(u.ux, u.uy));
  1550. X- 
  1551. X-     (void) makedog();
  1552. X-     seemons();
  1553. X- #ifdef NEWS
  1554. X-     if(flags.nonews || !readnews())
  1555. X-         /* after reading news we did docrt() already */
  1556. X- #endif
  1557. X-         docrt();
  1558. X- 
  1559. X-     return;
  1560. X  }
  1561. X--- 412,415 ----
  1562. X*** src/Old/unixtty.c    Wed Sep 27 12:24:56 1989
  1563. X--- src/unixtty.c    Sun Sep 17 14:26:48 1989
  1564. X***************
  1565. X*** 10,15 ****
  1566. X--- 10,16 ----
  1567. X  /* block some unused #defines to avoid overloading some cpp's */
  1568. X  #define MONATTK_H
  1569. X  #define ONAMES_H
  1570. X+ #define NEED_VARARGS
  1571. X  #include "hack.h"
  1572. X  
  1573. X  /*
  1574. X***************
  1575. X*** 187,199 ****
  1576. X  
  1577. X  /* fatal error */
  1578. X  /*VARARGS1*/
  1579. X  void
  1580. X! error(s, x, y)
  1581. X! char *s, *x, *y;
  1582. X! {
  1583. X      if(settty_needed)
  1584. X          settty(NULL);
  1585. X!     Printf(s,x,y);
  1586. X      (void) putchar('\n');
  1587. X      exit(1);
  1588. X  }
  1589. X--- 188,202 ----
  1590. X  
  1591. X  /* fatal error */
  1592. X  /*VARARGS1*/
  1593. X+ 
  1594. X  void
  1595. X! error VA_DECL(char *,s)
  1596. X!     VA_START(s);
  1597. X!     VA_INIT(s, char *);
  1598. X      if(settty_needed)
  1599. X          settty(NULL);
  1600. X!     Vprintf(s,VA_ARGS);
  1601. X      (void) putchar('\n');
  1602. X+     VA_END();
  1603. X      exit(1);
  1604. X  }
  1605. X*** src/Old/unixunix.c    Wed Sep 27 12:25:13 1989
  1606. X--- src/unixunix.c    Tue Sep 26 18:51:38 1989
  1607. X***************
  1608. X*** 27,33 ****
  1609. X  void
  1610. X  setrandom()
  1611. X  {
  1612. X! #ifdef SYSV
  1613. X      (void) Srand((long) time ((time_t *) 0));
  1614. X  #else
  1615. X  #ifdef ULTRIX
  1616. X--- 27,33 ----
  1617. X  void
  1618. X  setrandom()
  1619. X  {
  1620. X! #if defined(SYSV) || defined(DGUX)
  1621. X      (void) Srand((long) time ((time_t *) 0));
  1622. X  #else
  1623. X  #ifdef ULTRIX
  1624. X*** src/Old/vault.c    Wed Sep 27 12:25:28 1989
  1625. X--- src/vault.c    Mon Sep 25 21:30:30 1989
  1626. X***************
  1627. X*** 237,246 ****
  1628. X      fcp->ftyp = typ;
  1629. X  newpos:
  1630. X      if(EGD->gddone) nx = ny = 0;
  1631. X!     levl[guard->mx][guard->my].mmask = 0;
  1632. X!     levl[nx][ny].mmask = 1;
  1633. X!     guard->mx = nx;
  1634. X!     guard->my = ny;
  1635. X      pmon(guard);
  1636. X      restfakecorr();
  1637. X      return(1);
  1638. X--- 237,244 ----
  1639. X      fcp->ftyp = typ;
  1640. X  newpos:
  1641. X      if(EGD->gddone) nx = ny = 0;
  1642. X!     remove_monster(guard->mx, guard->my);
  1643. X!     place_monster(guard, nx, ny);
  1644. X      pmon(guard);
  1645. X      restfakecorr();
  1646. X      return(1);
  1647. X***************
  1648. X*** 270,277 ****
  1649. X      if (!u.ugold) return;
  1650. X  
  1651. X      if (u.uinvault) {
  1652. X!         Your("%ld Zorkmids goes into the Magic Memory Vault.",
  1653. X!         u.ugold);
  1654. X          mkgold(u.ugold, u.ux, u.uy);
  1655. X          u.ugold = 0L;
  1656. X      } else if (guard) {
  1657. X--- 268,275 ----
  1658. X      if (!u.ugold) return;
  1659. X  
  1660. X      if (u.uinvault) {
  1661. X!         Your("%ld zorkmid%s goes into the Magic Memory Vault.",
  1662. X!         u.ugold, plur(u.ugold));
  1663. X          mkgold(u.ugold, u.ux, u.uy);
  1664. X          u.ugold = 0L;
  1665. X      } else if (guard) {
  1666. X*** src/Old/version.c    Wed Sep 27 12:25:42 1989
  1667. X--- src/version.c    Sat Sep 16 17:54:27 1989
  1668. X***************
  1669. X*** 38,43 ****
  1670. X--- 38,46 ----
  1671. X  #ifdef UNIX
  1672. X          "Unix",
  1673. X  #endif
  1674. X+ #ifdef VMS
  1675. X+         "VMS",
  1676. X+ #endif
  1677. X          VERSION,
  1678. X  #ifndef BETA
  1679. X          PATCHLEVEL,
  1680. X*** src/Old/weapon.c    Wed Sep 27 12:25:56 1989
  1681. X--- src/weapon.c    Fri Sep 15 00:51:04 1989
  1682. X***************
  1683. X*** 171,185 ****
  1684. X  #ifdef TOLKIEN
  1685. X  static const int rwep[] =
  1686. X      { DWARVISH_SPEAR, ELVEN_SPEAR, SPEAR, ORCISH_SPEAR, JAVELIN,
  1687. X!       SHURIKEN, ELVEN_ARROW, ARROW, ORCISH_ARROW, CROSSBOW_BOLT,
  1688. X!       ELVEN_DAGGER, DAGGER, ORCISH_DAGGER, KNIFE, ROCK, LOADSTONE,
  1689. X!       LUCKSTONE, DART, BOOMERANG, CREAM_PIE
  1690. X        /* note: CREAM_PIE should NOT be #ifdef KOPS */
  1691. X        };
  1692. X  #else
  1693. X  static const int rwep[] =
  1694. X!     { SPEAR, JAVELIN, SHURIKEN, ARROW, CROSSBOW_BOLT, DAGGER, KNIFE,
  1695. X!       ROCK, LOADSTONE, LUCKSTONE, DART, BOOMERANG, CREAM_PIE
  1696. X        /* note: CREAM_PIE should NOT be #ifdef KOPS */
  1697. X        };
  1698. X  #endif
  1699. X--- 171,185 ----
  1700. X  #ifdef TOLKIEN
  1701. X  static const int rwep[] =
  1702. X      { DWARVISH_SPEAR, ELVEN_SPEAR, SPEAR, ORCISH_SPEAR, JAVELIN,
  1703. X!       SHURIKEN, SILVER_ARROW, ELVEN_ARROW, ARROW, ORCISH_ARROW,
  1704. X!       CROSSBOW_BOLT, ELVEN_DAGGER, DAGGER, ORCISH_DAGGER, KNIFE, ROCK,
  1705. X!       LOADSTONE, LUCKSTONE, DART, BOOMERANG, CREAM_PIE
  1706. X        /* note: CREAM_PIE should NOT be #ifdef KOPS */
  1707. X        };
  1708. X  #else
  1709. X  static const int rwep[] =
  1710. X!     { SPEAR, JAVELIN, SHURIKEN, SILVER_ARROW, ARROW, CROSSBOW_BOLT,
  1711. X!       DAGGER, KNIFE, ROCK, LOADSTONE, LUCKSTONE, DART, BOOMERANG, CREAM_PIE
  1712. X        /* note: CREAM_PIE should NOT be #ifdef KOPS */
  1713. X        };
  1714. X  #endif
  1715. X*** src/Old/were.c    Wed Sep 27 12:26:12 1989
  1716. X--- src/were.c    Thu Sep 14 14:34:44 1989
  1717. X***************
  1718. X*** 10,25 ****
  1719. X  {
  1720. X      register int pm = monsndx(mon->data);
  1721. X  
  1722. X-     if(Protection_from_shape_changers) return;
  1723. X      if(is_were(mon->data))
  1724. X          if(is_human(mon->data)) {
  1725. X          if(!rn2(50-(night()*20)) || flags.moonphase == FULL_MOON) {
  1726. X              new_were(mon);
  1727. X!             if(pm != PM_WERERAT && flags.soundok)
  1728. X              You("hear a %s howling at the moon.",
  1729. X                    pm == PM_WEREJACKAL ? "jackal" : "wolf");
  1730. X          }
  1731. X!         } else if(!rn2(30)) new_were(mon);
  1732. X  }
  1733. X  
  1734. X  static int
  1735. X--- 10,25 ----
  1736. X  {
  1737. X      register int pm = monsndx(mon->data);
  1738. X  
  1739. X      if(is_were(mon->data))
  1740. X          if(is_human(mon->data)) {
  1741. X+         if(Protection_from_shape_changers) return;
  1742. X          if(!rn2(50-(night()*20)) || flags.moonphase == FULL_MOON) {
  1743. X              new_were(mon);
  1744. X!             if(mons[pm].msound == MS_BARK && flags.soundok)
  1745. X              You("hear a %s howling at the moon.",
  1746. X                    pm == PM_WEREJACKAL ? "jackal" : "wolf");
  1747. X          }
  1748. X!         } else if(!rn2(30) || Protection_from_shape_changers) new_were(mon);
  1749. X  }
  1750. X  
  1751. X  static int
  1752. X***************
  1753. X*** 69,75 ****
  1754. X      register struct monst *mtmp;
  1755. X      boolean success = FALSE;
  1756. X  
  1757. X!     if(Protection_from_shape_changers)
  1758. X          return FALSE;
  1759. X      for(i = rnd(5); i > 0; i--) {
  1760. X         switch(pm) {
  1761. X--- 69,75 ----
  1762. X      register struct monst *mtmp;
  1763. X      boolean success = FALSE;
  1764. X  
  1765. X!     if(Protection_from_shape_changers && !yours)
  1766. X          return FALSE;
  1767. X      for(i = rnd(5); i > 0; i--) {
  1768. X         switch(pm) {
  1769. X*** src/Old/wield.c    Wed Sep 27 12:26:26 1989
  1770. X--- src/wield.c    Mon Sep 25 23:01:52 1989
  1771. X***************
  1772. X*** 209,215 ****
  1773. X      } else
  1774. X          Sprintf(buf, "Your %s%s",
  1775. X              is_sword(obj) ? "sword" : "weapon",
  1776. X!             ((obj->quan > 1) ? "s" : ""));
  1777. X      Strcat(buf, (obj->quan==1) ? " is" : " are");
  1778. X  #ifdef POLYSELF
  1779. X      Sprintf(eos(buf), " welded to your %s!",
  1780. X--- 209,215 ----
  1781. X      } else
  1782. X          Sprintf(buf, "Your %s%s",
  1783. X              is_sword(obj) ? "sword" : "weapon",
  1784. X!             plur((long)obj->quan));
  1785. X      Strcat(buf, (obj->quan==1) ? " is" : " are");
  1786. X  #ifdef POLYSELF
  1787. X      Sprintf(eos(buf), " welded to your %s!",
  1788. X*** src/Old/wizard.c    Wed Sep 27 12:26:39 1989
  1789. X--- src/wizard.c    Thu Sep 14 20:44:26 1989
  1790. X***************
  1791. X*** 80,93 ****
  1792. X                  mnexto(mtmp);
  1793. X                  return(0);
  1794. X              }
  1795. X!             if(!levl[otmp->ox][otmp->oy].mmask ||
  1796. X                  (mtmp->mx == otmp->ox && mtmp->my == otmp->oy)) {
  1797. X  
  1798. X                  /* teleport to it and pick it up */
  1799. X!                 levl[mtmp->mx][mtmp->my].mmask = 0;
  1800. X!                 levl[otmp->ox][otmp->oy].mmask = 1;
  1801. X!                 mtmp->mx = otmp->ox;
  1802. X!                 mtmp->my = otmp->oy;
  1803. X                  freeobj(otmp);
  1804. X                  mpickobj(mtmp, otmp);
  1805. X                  pmon(mtmp);
  1806. X--- 80,91 ----
  1807. X                  mnexto(mtmp);
  1808. X                  return(0);
  1809. X              }
  1810. X!             if(!MON_AT(otmp->ox, otmp->oy) ||
  1811. X                  (mtmp->mx == otmp->ox && mtmp->my == otmp->oy)) {
  1812. X  
  1813. X                  /* teleport to it and pick it up */
  1814. X!                 remove_monster(mtmp->mx, mtmp->my);
  1815. X!                 place_monster(mtmp, otmp->ox, otmp->oy);
  1816. X                  freeobj(otmp);
  1817. X                  mpickobj(mtmp, otmp);
  1818. X                  pmon(mtmp);
  1819. X*** src/Old/worm.c    Wed Sep 27 12:26:55 1989
  1820. X--- src/worm.c    Sun Sep 17 12:28:48 1989
  1821. X***************
  1822. X*** 47,53 ****
  1823. X  register struct wseg *wtmp;
  1824. X  {
  1825. X      if (mtmp->mx != wtmp->wx || mtmp->my != wtmp->wy)
  1826. X!         levl[wtmp->wx][wtmp->wy].mmask = 0;
  1827. X      if(wtmp->wdispl) newsym(wtmp->wx, wtmp->wy);
  1828. X      free((genericptr_t) wtmp);
  1829. X  }
  1830. X--- 47,53 ----
  1831. X  register struct wseg *wtmp;
  1832. X  {
  1833. X      if (mtmp->mx != wtmp->wx || mtmp->my != wtmp->wy)
  1834. X!         remove_monster(wtmp->wx, wtmp->wy);
  1835. X      if(wtmp->wdispl) newsym(wtmp->wx, wtmp->wy);
  1836. X      free((genericptr_t) wtmp);
  1837. X  }
  1838. X***************
  1839. X*** 181,187 ****
  1840. X      /* sometimes the tail end dies */
  1841. X      if(rn2(3) || !getwn(mtmp2)){
  1842. X          monfree(mtmp2);
  1843. X!         levl[mtmp2->mx][mtmp2->my].mmask = 1;
  1844. X              /* since mtmp is still on that spot */
  1845. X          tmp2 = 0;
  1846. X      } else {
  1847. X--- 181,187 ----
  1848. X      /* sometimes the tail end dies */
  1849. X      if(rn2(3) || !getwn(mtmp2)){
  1850. X          monfree(mtmp2);
  1851. X!         place_worm_seg(mtmp, mtmp2->mx, mtmp2->my);
  1852. X              /* since mtmp is still on that spot */
  1853. X          tmp2 = 0;
  1854. X      } else {
  1855. X***************
  1856. X*** 196,216 ****
  1857. X          remseg(mtmp, wtmp->nseg);
  1858. X          wtmp->nseg = 0;
  1859. X          if(tmp2) {
  1860. X!             You("cut the worm in half.");
  1861. X          /* devalue the monster level of both halves of the worm */
  1862. X              mtmp->m_lev = (mtmp->m_lev <= 2) ? 2 : mtmp->m_lev - 2;
  1863. X              mtmp2->m_lev = mtmp->m_lev;
  1864. X          /* calculate the mhp on the new (lower) monster level */
  1865. X              mtmp2->mhpmax = mtmp2->mhp = d((int)mtmp2->m_lev, 8);
  1866. X!             mtmp2->mx = wtmp->wx;
  1867. X!             mtmp2->my = wtmp->wy;
  1868. X!             levl[mtmp2->mx][mtmp2->my].mmask = 1;
  1869. X              mtmp2->nmon = fmon;
  1870. X              fmon = mtmp2;
  1871. X              mtmp2->mdispl = 0;
  1872. X              pmon(mtmp2);
  1873. X          } else {
  1874. X!             You("cut off part of the worm's tail.");
  1875. X              remseg(mtmp, wtmp);
  1876. X          }
  1877. X          mtmp->mhp /= 2;
  1878. X--- 196,215 ----
  1879. X          remseg(mtmp, wtmp->nseg);
  1880. X          wtmp->nseg = 0;
  1881. X          if(tmp2) {
  1882. X!             kludge("You cut %s in half.", mon_nam(mtmp));
  1883. X          /* devalue the monster level of both halves of the worm */
  1884. X              mtmp->m_lev = (mtmp->m_lev <= 2) ? 2 : mtmp->m_lev - 2;
  1885. X              mtmp2->m_lev = mtmp->m_lev;
  1886. X          /* calculate the mhp on the new (lower) monster level */
  1887. X              mtmp2->mhpmax = mtmp2->mhp = d((int)mtmp2->m_lev, 8);
  1888. X!             place_monster(mtmp2, wtmp->wx, wtmp->wy);
  1889. X              mtmp2->nmon = fmon;
  1890. X              fmon = mtmp2;
  1891. X              mtmp2->mdispl = 0;
  1892. X              pmon(mtmp2);
  1893. X          } else {
  1894. X!             if (Blind) You("cut off part of its tail.");
  1895. X!             else You("cut off part of %s's tail.", mon_nam(mtmp));
  1896. X              remseg(mtmp, wtmp);
  1897. X          }
  1898. X          mtmp->mhp /= 2;
  1899. X*** src/Old/worn.c    Wed Sep 27 12:27:10 1989
  1900. X--- src/worn.c    Mon Sep 25 21:35:28 1989
  1901. X***************
  1902. X*** 138,144 ****
  1903. X  
  1904. X      if (obj->otyp != DRAGON_SCALE_MAIL) return;
  1905. X      switch(obj->corpsenm) {
  1906. X!         case PM_GREY_DRAGON:
  1907. X              mask = &Antimagic;
  1908. X              break;
  1909. X          case PM_RED_DRAGON:
  1910. X--- 138,144 ----
  1911. X  
  1912. X      if (obj->otyp != DRAGON_SCALE_MAIL) return;
  1913. X      switch(obj->corpsenm) {
  1914. X!         case PM_GRAY_DRAGON:
  1915. X              mask = &Antimagic;
  1916. X              break;
  1917. X          case PM_RED_DRAGON:
  1918. X*** src/Old/write.c    Wed Sep 27 12:27:23 1989
  1919. X--- src/write.c    Mon Sep 25 21:30:53 1989
  1920. X***************
  1921. X*** 96,102 ****
  1922. X      getlin(namebuf);
  1923. X      if(namebuf[0] == '\033' || !namebuf[0])
  1924. X          return;
  1925. X!     Strcpy(scrbuf,"scroll of ");
  1926. X      Strcat(scrbuf,namebuf);
  1927. X      newscroll = readobjnam(scrbuf);
  1928. X  
  1929. X--- 96,104 ----
  1930. X      getlin(namebuf);
  1931. X      if(namebuf[0] == '\033' || !namebuf[0])
  1932. X          return;
  1933. X!     scrbuf[0] = '\0';
  1934. X!     if(strncmp(namebuf,"scroll of ",10) != 0)
  1935. X!         Strcpy(scrbuf,"scroll of ");
  1936. X      Strcat(scrbuf,namebuf);
  1937. X      newscroll = readobjnam(scrbuf);
  1938. X  
  1939. X*** src/Old/zap.c    Wed Sep 27 12:27:39 1989
  1940. X--- src/zap.c    Tue Sep 26 23:23:24 1989
  1941. X***************
  1942. X*** 145,150 ****
  1943. X--- 145,156 ----
  1944. X          break;
  1945. X  #endif
  1946. X      case WAN_OPENING:
  1947. X+         if(u.uswallow && mtmp == u.ustuck) {
  1948. X+             if (Blind) pline("Its mouth opens!");
  1949. X+             else pline("%s opens its mouth!", Monnam(mtmp));
  1950. X+             regurgitates(mtmp);
  1951. X+             break;
  1952. X+         }
  1953. X      case WAN_LOCKING:
  1954. X  #ifdef SPELLS
  1955. X      case SPE_KNOCK:
  1956. X***************
  1957. X*** 189,195 ****
  1958. X                  montype = PM_UNARMORED_SOLDIER;
  1959. X  #endif
  1960. X              mons[montype].pxlth += nl;
  1961. X!             mtmp = mkmon_at(mons[montype].mname, x, y);
  1962. X              mons[montype].pxlth -= nl;
  1963. X              if (mtmp) {
  1964. X                  /* Monster retains its name */
  1965. X--- 195,201 ----
  1966. X                  montype = PM_UNARMORED_SOLDIER;
  1967. X  #endif
  1968. X              mons[montype].pxlth += nl;
  1969. X!             mtmp = makemon(&mons[montype], x, y);
  1970. X              mons[montype].pxlth -= nl;
  1971. X              if (mtmp) {
  1972. X                  /* Monster retains its name */
  1973. X***************
  1974. X*** 220,225 ****
  1975. X--- 226,234 ----
  1976. X  #ifdef MAIL
  1977. X          obj->otyp == SCR_MAIL ||
  1978. X  #endif
  1979. X+ #ifdef TUTTI_FRUTTI
  1980. X+         obj->otyp == SLIME_MOLD ||
  1981. X+ #endif
  1982. X          obj->otyp == KEY || obj->otyp == SKELETON_KEY ||
  1983. X          obj->otyp == LARGE_BOX || obj->otyp == CHEST))
  1984. X          obj->spe = (obj->olet == WAND_SYM) ? -1 : 0;
  1985. X***************
  1986. X*** 286,292 ****
  1987. X              otmp2->opoisoned = 1;
  1988. X  
  1989. X          /* Turn dragon corpses into dragon armors */
  1990. X!         if (obj->otyp == CORPSE && obj->corpsenm >= PM_GREY_DRAGON
  1991. X                  && obj->corpsenm <= PM_YELLOW_DRAGON) {
  1992. X              if (!rn2(10)) { /* Random failure */
  1993. X                  otmp2->otyp = TIN;
  1994. X--- 295,301 ----
  1995. X              otmp2->opoisoned = 1;
  1996. X  
  1997. X          /* Turn dragon corpses into dragon armors */
  1998. X!         if (obj->otyp == CORPSE && obj->corpsenm >= PM_GRAY_DRAGON
  1999. X                  && obj->corpsenm <= PM_YELLOW_DRAGON) {
  2000. X              if (!rn2(10)) { /* Random failure */
  2001. X                  otmp2->otyp = TIN;
  2002. X***************
  2003. X*** 781,787 ****
  2004. X              if(u.uswallow) {
  2005. X                  register struct monst *mtmp = u.ustuck;
  2006. X  
  2007. X!                 You("pierce %s's stomach wall!", mon_nam(mtmp));
  2008. X                  mtmp->mhp = 1;    /* almost dead */
  2009. X                  regurgitates(mtmp);
  2010. X                  break;
  2011. X--- 790,798 ----
  2012. X              if(u.uswallow) {
  2013. X                  register struct monst *mtmp = u.ustuck;
  2014. X  
  2015. X!                 if (Blind) You("pierce its stomach wall!");
  2016. X!                 else You("pierce %s's stomach wall!",
  2017. X!                     mon_nam(mtmp));
  2018. X                  mtmp->mhp = 1;    /* almost dead */
  2019. X                  regurgitates(mtmp);
  2020. X                  break;
  2021. X***************
  2022. X*** 939,945 ****
  2023. X--- 950,960 ----
  2024. X  
  2025. X      if(sym) {
  2026. X          tmp_at(-1, sym);    /* open call */
  2027. X+ #ifdef TEXTCOLOR
  2028. X+         tmp_at(-3, (int)objects[obj->otyp].oc_color);
  2029. X+ #else
  2030. X          tmp_at(-3, (int)AT_OBJ);
  2031. X+ #endif
  2032. X      }
  2033. X      while(range-- > 0) {
  2034. X  #ifdef STRONGHOLD
  2035. X***************
  2036. X*** 949,955 ****
  2037. X          bhitpos.y += ddy;
  2038. X  #ifdef STRONGHOLD
  2039. X          x = bhitpos.x; y = bhitpos.y;
  2040. X!         if (find_drawbridge(&x,&y))
  2041. X              switch (obj->otyp) {
  2042. X              case WAN_OPENING:
  2043. X  # ifdef SPELLS
  2044. X--- 964,970 ----
  2045. X          bhitpos.y += ddy;
  2046. X  #ifdef STRONGHOLD
  2047. X          x = bhitpos.x; y = bhitpos.y;
  2048. X!         if (find_drawbridge(&x,&y) && !sym)
  2049. X              switch (obj->otyp) {
  2050. X              case WAN_OPENING:
  2051. X  # ifdef SPELLS
  2052. X***************
  2053. X*** 970,976 ****
  2054. X                  destroy_drawbridge(x,y);
  2055. X              }
  2056. X  #endif /* STRONGHOLD /**/
  2057. X!         if(levl[bhitpos.x][bhitpos.y].mmask){
  2058. X              mtmp = m_at(bhitpos.x,bhitpos.y);
  2059. X              if(sym) {
  2060. X                  tmp_at(-1, -1);    /* close call */
  2061. X--- 985,991 ----
  2062. X                  destroy_drawbridge(x,y);
  2063. X              }
  2064. X  #endif /* STRONGHOLD /**/
  2065. X!         if(MON_AT(bhitpos.x, bhitpos.y)){
  2066. X              mtmp = m_at(bhitpos.x,bhitpos.y);
  2067. X              if(sym) {
  2068. X                  tmp_at(-1, -1);    /* close call */
  2069. X***************
  2070. X*** 995,1001 ****
  2071. X              if(hitanything)    range--;
  2072. X          }
  2073. X          typ = levl[bhitpos.x][bhitpos.y].typ;
  2074. X!         if(IS_DOOR(typ) || typ == SDOOR) {
  2075. X              switch (obj->otyp) {
  2076. X              case WAN_OPENING:
  2077. X              case WAN_LOCKING:
  2078. X--- 1010,1016 ----
  2079. X              if(hitanything)    range--;
  2080. X          }
  2081. X          typ = levl[bhitpos.x][bhitpos.y].typ;
  2082. X!         if((IS_DOOR(typ) || typ == SDOOR) && !sym) {
  2083. X              switch (obj->otyp) {
  2084. X              case WAN_OPENING:
  2085. X              case WAN_LOCKING:
  2086. X***************
  2087. X*** 1065,1071 ****
  2088. X          dy = ydir[i];
  2089. X          bhitpos.x += dx;
  2090. X          bhitpos.y += dy;
  2091. X!         if(levl[bhitpos.x][bhitpos.y].mmask){
  2092. X              tmp_at(-1,-1);
  2093. X              return(m_at(bhitpos.x,bhitpos.y));
  2094. X          }
  2095. X--- 1080,1086 ----
  2096. X          dy = ydir[i];
  2097. X          bhitpos.x += dx;
  2098. X          bhitpos.y += dy;
  2099. X!         if(MON_AT(bhitpos.x, bhitpos.y)){
  2100. X              tmp_at(-1,-1);
  2101. X              return(m_at(bhitpos.x,bhitpos.y));
  2102. X          }
  2103. X***************
  2104. X*** 1075,1082 ****
  2105. X              break;
  2106. X          }
  2107. X          if(bhitpos.x == u.ux && bhitpos.y == u.uy) { /* ct == 9 */
  2108. X!             if(rn2(20) >= ACURR(A_DEX)){ /* we hit ourselves */
  2109. X!                 (void) thitu(10, rnd(10), "boomerang");
  2110. X                  break;
  2111. X              } else {    /* we catch it */
  2112. X                  tmp_at(-1,-1);
  2113. X--- 1090,1099 ----
  2114. X              break;
  2115. X          }
  2116. X          if(bhitpos.x == u.ux && bhitpos.y == u.uy) { /* ct == 9 */
  2117. X!             if(Fumbling || rn2(20) >= ACURR(A_DEX)){
  2118. X!                 /* we hit ourselves */
  2119. X!                 (void) thitu(10, rnd(10), (struct obj *)0,
  2120. X!                     "boomerang");
  2121. X                  break;
  2122. X              } else {    /* we catch it */
  2123. X                  tmp_at(-1,-1);
  2124. X***************
  2125. X*** 1186,1196 ****
  2126. X  }
  2127. X  
  2128. X  /*
  2129. X!  * burn scrolls on floor at position x,y
  2130. X!  * return the number of scrolls burned
  2131. X   */
  2132. X  static int
  2133. X! burn_floor_scrolls(x, y)
  2134. X  int x, y;
  2135. X  {
  2136. X      register struct obj *obj, *obj2;
  2137. X--- 1203,1213 ----
  2138. X  }
  2139. X  
  2140. X  /*
  2141. X!  * burn scrolls and spell books on floor at position x,y
  2142. X!  * return the number of scrolls and spell books burned
  2143. X   */
  2144. X  static int
  2145. X! burn_floor_paper(x, y)
  2146. X  int x, y;
  2147. X  {
  2148. X      register struct obj *obj, *obj2;
  2149. X***************
  2150. X*** 1200,1206 ****
  2151. X      for(obj = fobj; obj; obj = obj2) {
  2152. X          obj2 = obj->nobj;
  2153. X          /* Bug fix - KAA */
  2154. X!         if(obj->ox == x && obj->oy == y && obj->olet == SCROLL_SYM) {
  2155. X          scrquan = obj->quan;
  2156. X          for(i = 1; i <= scrquan ; i++)
  2157. X              if(!rn2(3))  {
  2158. X--- 1217,1228 ----
  2159. X      for(obj = fobj; obj; obj = obj2) {
  2160. X          obj2 = obj->nobj;
  2161. X          /* Bug fix - KAA */
  2162. X!         if(obj->ox == x && obj->oy == y &&
  2163. X! #ifdef SPELLS
  2164. X!            (obj->olet == SCROLL_SYM || obj->olet == SPBOOK_SYM)) {
  2165. X! #else
  2166. X!            obj->olet == SCROLL_SYM) {
  2167. X! #endif
  2168. X          scrquan = obj->quan;
  2169. X          for(i = 1; i <= scrquan ; i++)
  2170. X              if(!rn2(3))  {
  2171. X***************
  2172. X*** 1391,1402 ****
  2173. X              }
  2174. X          }
  2175. X          if(OBJ_AT(sx, sy) && abstype == 1)
  2176. X!             if(burn_floor_scrolls(sx,sy) && cansee(sx,sy))  {
  2177. X                  mnewsym(sx,sy);
  2178. X                  if(!Blind)
  2179. X                  You("see a puff of smoke.");
  2180. X              }
  2181. X!         if(levl[sx][sy].mmask){
  2182. X              mon = m_at(sx,sy);
  2183. X              /* Cannot use wakeup() which also angers the monster */
  2184. X              mon->msleep = 0;
  2185. X--- 1413,1424 ----
  2186. X              }
  2187. X          }
  2188. X          if(OBJ_AT(sx, sy) && abstype == 1)
  2189. X!             if(burn_floor_paper(sx,sy) && cansee(sx,sy))  {
  2190. X                  mnewsym(sx,sy);
  2191. X                  if(!Blind)
  2192. X                  You("see a puff of smoke.");
  2193. X              }
  2194. X!         if(MON_AT(sx, sy)){
  2195. X              mon = m_at(sx,sy);
  2196. X              /* Cannot use wakeup() which also angers the monster */
  2197. X              mon->msleep = 0;
  2198. X***************
  2199. X*** 1863,1889 ****
  2200. X  {
  2201. X      register int    resisted = 0;
  2202. X  #ifdef HARD
  2203. X!     register int    level;
  2204. X  
  2205. X      switch(olet)  {
  2206. X  
  2207. X          case WAND_SYM:
  2208. X!             level = 8;
  2209. X              break;
  2210. X  
  2211. X          case SCROLL_SYM:
  2212. X!             level = 6;
  2213. X              break;
  2214. X  
  2215. X          case POTION_SYM:
  2216. X!             level = 5;
  2217. X              break;
  2218. X  
  2219. X!         default:    level = u.ulevel;
  2220. X              break;
  2221. X      }
  2222. X  
  2223. X!     resisted = (rn2(100) - mtmp->m_lev + level) < mtmp->data->mr;
  2224. X      if(resisted) {
  2225. X  
  2226. X          if(tell) {
  2227. X--- 1885,1911 ----
  2228. X  {
  2229. X      register int    resisted = 0;
  2230. X  #ifdef HARD
  2231. X!     register int    lev;
  2232. X  
  2233. X      switch(olet)  {
  2234. X  
  2235. X          case WAND_SYM:
  2236. X!             lev = 8;
  2237. X              break;
  2238. X  
  2239. X          case SCROLL_SYM:
  2240. X!             lev = 6;
  2241. X              break;
  2242. X  
  2243. X          case POTION_SYM:
  2244. X!             lev = 5;
  2245. X              break;
  2246. X  
  2247. X!         default:    lev = u.ulevel;
  2248. X              break;
  2249. X      }
  2250. X  
  2251. X!     resisted = (rn2(100) - mtmp->m_lev + lev) < mtmp->data->mr;
  2252. X      if(resisted) {
  2253. X  
  2254. X          if(tell) {
  2255. X***************
  2256. X*** 1925,1933 ****
  2257. X      }
  2258. X      if (otmp != &zeroobj) {
  2259. X          if(dropit) {
  2260. X!         pline("Oops!  The %s drop%s to the floor!", xname(otmp),
  2261. X!             otmp->quan > 1 ? "" : "s");
  2262. X!         dropy(otmp);
  2263. X          } else {
  2264. X              wishquan = otmp->quan;
  2265. X              otmp = addinv(otmp);
  2266. X--- 1947,1954 ----
  2267. X      }
  2268. X      if (otmp != &zeroobj) {
  2269. X          if(dropit) {
  2270. X!             pline("Oops!  The %s to the floor!", aobjnam(otmp, "drop"));
  2271. X!             dropy(otmp);
  2272. X          } else {
  2273. X              wishquan = otmp->quan;
  2274. X              otmp = addinv(otmp);
  2275. X
  2276. END_OF_FILE
  2277. if test 56197 -ne `wc -c <'patches04e'`; then
  2278.     echo shar: \"'patches04e'\" unpacked with wrong size!
  2279. fi
  2280. # end of 'patches04e'
  2281. fi
  2282. echo shar: End of archive 5 \(of 11\).
  2283. cp /dev/null ark5isdone
  2284. MISSING=""
  2285. for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
  2286.     if test ! -f ark${I}isdone ; then
  2287.     MISSING="${MISSING} ${I}"
  2288.     fi
  2289. done
  2290. if test "${MISSING}" = "" ; then
  2291.     echo You have unpacked all 11 archives.
  2292.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2293. else
  2294.     echo You still need to unpack the following archives:
  2295.     echo "        " ${MISSING}
  2296. fi
  2297. ##  End of shell archive.
  2298. exit 0
  2299.